package com.taxshare.purchaser.util;

/**
 * @ClassName: CodeConvertUtil
 * @Description:
 * @author: luozhongyi
 * @date: 2021/4/12 16:53
 */
public class CodeConvertUtil {

    /**
     * 业务执行状态
     *
     * @param state
     * @return
     */
    public static String taskStatus(String state) {
        if (null == state){
            state = "";
        }
        switch (state) {
            case "0":
                return "任务接收成功,待处理";
            case "1":
                return "任务处理完成";
            case "2":
                return "任务处理中";
            default:
                return "未处理";
        }
    }

    /**
     * 业务执行状态
     *
     * @param state
     * @return
     */
    public static String applyBusinessStatus(String state) {
        if (null == state){
            state = "";
        }
        switch (state) {
            case "0":
                return "待处理";
            case "1":
                return "处理成功（申请统计成功或撤销统计成功）";
            case "2":
                return "未提交申请统计";
            case "3":
                return "已提交申请统计";
            case "4":
                return "不符合申请生成抵扣统计报表条件(一般是已经申请过)";
            case "5":
                return "不符合撤销条件！";
            case "6":
                return "执行异常";
            case "7":
                return "正常抵扣发票统计完成";
            case "8":
                return "没有符合条件的记录";
            case "9":
                return "系统执行中";
            case "10":
                return "抵扣统计查询失败";
            default:
                return "未处理";
        }
    }

    /**
     * 业务执行状态
     *
     * @param state
     * @return
     */
    public static String signatureBusinessStatus(String state) {
        if (null == state){
            state = "";
        }
        switch (state) {
            case "0":
                return "待处理";
            case "1":
                return "确认成功";
            case "2":
                return "未提交申请统计";
            case "4":
                return "统计结果不符";
            case "5":
                return "已确认统计";
            case "6":
                return "执行异常";
            case "7":
                return "确认失败";
            case "8":
                return "不符合提交确认申报条件";
            case "9":
                return "系统执行中";
            case "10":
                return "签名值错误";
            case "11":
                return "未设置确认密码";
            case "12":
                return "确认密码错误";
            default:
                return "未处理";
        }
    }
    /**
     * 企业认证申请状态
     *
     * @param state
     * @return
     */
    public static String periodStatus(String state) {
        switch (state) {
            case "0":
                return "未提交";
            case "1":
                return "已提交";
            case "2":
                return "已确认";
            case "3":
                return "已撤销";
            default:
                return "未知状态";
        }
    }
}
